package dateDemo;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.temporal.ChronoField;

/**
 * @Author wangtengyu
 * @Create 2018-06-08-16:39
 */
public class test1 {

    public static void main(String[] args) {
        LocalDateTime localDateTime=LocalDateTime.now();
        LocalTime time= LocalTime.now();
        LocalDate now=LocalDate.now();
        System.out.println(now.getYear());
        System.out.println(now.get(ChronoField.YEAR));


    }
}
